<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    const obj1 = { a: 10 };
    const obj2 = { b: 20 };
    const obj3 = { c: 30 };
    const obj3 = {
      ...obj1,
      ...obj2,
      ...obj3
    }

    // ES2018
    console.log({ ...obj1, ...obj2, ...obj3 });    // → {a: 10, b: 20, c: 30}

    // ES2015
    console.log(Object.assign({}, obj1, obj2, obj3));    // → {a: 10, b: 20, c: 30}
  </script>
</body>

</html>